package cn.com.mtons.designpattern.adapter.entrust;

/**
 * 类适配器模式 - 使用委托
 * 1. 继承“需要”适配对象
 */
public class PrintBanner extends Print {

    private Banner banner;

    public PrintBanner(String string) {
        this.banner = new Banner(string);
    }

    @Override
    public void printWeak() {
        banner.showWithParen();
    }

    @Override
    public void printStrong() {
        banner.showWithAster();
    }
}
